import type { ChatMessage, IChatInfo } from './chat';

export interface IApiResponse<T> {
  code: number;
  message: string;
  data: T;
}

export interface IApiRequest {
  phone: string;
  password: string;
}

export interface IQueryCourseContent {
  subject_id: number | string;
}

export interface IQueryCourseQuestions {
  subject_id: number | string;
}

export interface IResponseChatMessage {
  messages: ChatMessage[];
  total?: number;
  page?: number;
  pages?: number;
  size?: number;
  hasMore?: boolean;
}

export interface IResponseChatList {
  conversations: IChatInfo[];
}

export interface IResponseCreateChat {
  data: { conversation_id: number; title: string };
}

export interface IQueryChat {
  conversation_id: number | string;
}

export interface IQueryGetChatMessage extends IQueryChat {
  page?: number;
  size?: number;
}

export interface IQueryUpdateChatTitle extends IQueryChat {
  title: string;
}
